Session Initialisation

Introduction

Each time Dyalog starts it loads and executes an initialisation file whose name is defined by the DyalogStartup parameter. If this is undefined, the default file is named startup.dyalog in the Dyalog directory. Among other tasks, the code defined in startup.dyalog also performs Session initialisation.

Implementation

Code to be installed in ⎕SE is specified in APL source code files contained in Session initialisation directories identified by the DyalogStartupSE parameter. If this parameter is not specified, the default is a directory named StartupSession located in three standard locations as described below.

Only content stored in files matching the wildcard patterns *.dyalog and *.apl? will be loaded. All such files must be appropriate for ⎕FIX.

For each sub-directory in a Session initialisation directory, a corresponding namespace is created in ⎕SE, and any source code files in these sub-directories will be fixed in their respective corresponding namespaces. There is currently no support for additional subdirectories inside these subdirectories, although this feature is planned.

The Session initialisation directories are processed in order and code defined in each directory will replace code with the same name defined previously. In effect, this means that user-supplied content can replace content supplied by Dyalog Ltd. and version-specific content can replace version-agnostic content.

Default Session Initialisation Directories

If the DyalogStartupSE parameter is undefined, APL looks for Session initialisation directories named StartupSession in the following three locations, and processes them in that order:

  1. The Dyalog installation directory (which contains the dyalog executable)
  2. A version-agnostic sub-directory in the user directory (the standard directory for user-related Dyalog APL files)
  3. A version-specific sub-directory in the user directory, whose name is derived as described below.

Under Windows these might be:

  1. C:\Program Files\Dyalog\Dyalog APL-64 18.0 Unicode
  2. C:\Users\Pete\Documents\Dyalog APL Files
  3. C:\Users\Pete\Documents\Dyalog APL-64 18.0 Unicode Files

The version-specific name is :

     Dyalog APL{bit} {version} {edition}

where: